package com.bestcem.xm.award.controller.param.draw;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Map;

/**
 * 短信验证码校验 参数
 *
 * @author ympan <yuming.pan@idiaoyan.com>
 * @version v3.0
 * @date 2021/8/18 16:13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class VerifySmsVerificationCodeParam {

    /**
     * 短信验证码校验 award参数
     */
    Map<String,Object> award;

    /**
     * 抽奖手机号
     */
    @NotBlank(message = "抽奖手机号不能为空")
    @Pattern(regexp = "(1[3-9][0-9])[0-9]{8}", message = "抽奖手机号格式错误")
    private String phone;

    /**
     * 验证码
     */
    @NotBlank(message = "验证码不能为空")
    @Pattern(regexp = "^\\d{4}$", message = "验证码格式错误")
    private String code;
}
    